import request from './index'
import qs from 'qs'
/**
 * 封装post
 */
export function POST(params,data) {
    console.log(data)
    return request({
        url: params,
        method: 'POST',
        data: qs.stringify(data),
        headers: {
          "Content-Type":"application/x-www-form-urlencoded",
          'Authorization': this.$cookies.get("token")
        }
    }).then(res=>{
        if(res.data.code == 0) {
          return res.data.result
        }
    })
}

/**
 * 封装get
 */
export function getProlist (params) {
  const { url } = params
  return request({
    url,
    method: 'GET'
  })
}
